package club.dmyang.common.vo;

import club.dmyang.common.enums.RespCodeEnums;

/**
 * Created by brss on 2018/7/14.
 */
public class ResposeVo {
    //响应码
    private Integer code;
    //响应消息
    private String msg;
    //如果查询数据，则返回数据条数
    private Integer count;
    //数据
    private Object data;

    /**默认构造响应成功的VO**/
    public ResposeVo(){
        code= RespCodeEnums.RESP_CODE_SUCC.getCode();
        msg=RespCodeEnums.RESP_CODE_SUCC.getMsg();
        count=0;
        data="";
    }

    public ResposeVo(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public ResposeVo(Integer code, String msg, Integer count, Object data) {
        this.code = code;
        this.msg = msg;
        this.count = count;
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
